function y = freroth(x)
%Freudenstein and Roth function
%n=2,m=2,x0=[0.5,-2]
%fmin1=f2([5;4])=0
%fmin2=f2([11.41;-0.8968])=48.9842
%Author:Ji Lin
y1=-13+x(1)+((5-x(2))*x(2)-2)*x(2);
y2=-29+x(1)+((x(2)+1)*x(2)-14)*x(2);
y=y1^2+y2^2;